using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Helper;
namespace CoreData
{
    public class user_group
    {
             public long id { get; set; }
            public long userid{get;set;}
            public long groupid{get;set;}
         
        public user_group()
        {       
        }
        
       static user_group DynamicCast<T>(object row_data, object row_header) where T : user_group
       {
           // row_data : DataRow
           // row_header : DataColumnCollection
           user_group ret = new user_group();
           DataRow dt = (DataRow)row_data;

           foreach (DataColumn column in (DataColumnCollection)row_header)
           {
               switch (column.ColumnName)
               {
                   case "id":
                       ret.id = ConvertObject.ToLong(dt[column]);
                       break;
                      case  "userid":
                        ret.userid = ConvertObject.ToLong(dt[column]);
                       break;
                      case  "groupid":
                        ret.groupid = ConvertObject.ToLong(dt[column]);
                       break;
                
                   default:
                       break;
               }
           }

           return ret;
       }
        
    }
}
